from common.read_json_file import read_json_file
from config import BASE_DIR
from api.ihrm_login_api import IhrmLoginApi
import pytest
from common.assert_tools import common_assert

class TestIhrmLogin(object):
    data = read_json_file(BASE_DIR+'/data/login_data.json')
    @pytest.mark.parametrize("desc,req_data,status_code,success,code,message",data)
    def test_ihrm_login(self,desc,req_data,status_code,success,code,message):
        resp = IhrmLoginApi.login(req_data)
        print(desc,"：",resp.json())
        common_assert(resp,status_code,success,code,message)

